import time

from django.test import TestCase

import random

list = []
for i in range(100):
    list.append(i + 1)


def _random(num):
    data = []
    for i in range(num):
        temp = random.randint(1, len(list))
        data.append(temp)
    return data


def select(num):
    win = _random(num)
    data2 = []
    for i in win:
        data2.append(i)
        if list.count(i):
            list.remove(i)
    return data2


print(select(20))
print(select(10))
print(select(7))
print(select(2))
print(select(1))
